<?php


    require_once 'funzioni.php';

    if (isset ($_GET['lang'])){  
	
	if($_GET ['lang']== 'it' || $_GET ['lang']== 'en' ){ // se si...
		
		$lang = $_GET ['lang']; 
	}
	else{
		$lang = 'it'; 
	}
    }
    else{
		$lang = 'it'; 
	}
	
	if(isset($_GET['id']))
	{
		if ($_GET['id']== (int)$_GET['id'])
		{
			$id= $_GET['id'];		
		}	
	}
	
	else
	{
		//TODO
	}
	
	if(isset($id) && isset($lang))
	{
		$page = getPage ($id,$lang);
	}
	
	$page = getPage($id,$lang);

	include 'views/header.php';
	include 'views/renderpage.php';
	include 'views/footer.php';